#ifdef MULTIMEDIA

#ifndef NATIVEAUDIO_H
#define NATIVEAUDIO_H

#include <QIODevice>
#include <QString>
#include <QtMultimedia/QAudioInput>
#include <QtMultimedia/QAudioOutput>
#include <QtMultimedia/QAudioFormat>

#include "audioformat.h"

class NativeAudio : public QIODevice
{
    Q_OBJECT
public:
    explicit NativeAudio(const QString name, AudioFormat *format, QObject *parent = 0);
    qint64 readData(char *data, qint64 maxlen);
    qint64 writeData(const char *data, qint64 len);
    bool open(OpenMode mode);
    void close();
private:
    QIODevice *devIn;
    QIODevice *devOut;
    QAudioFormat format;
    QString name;
    QAudioOutput *out;
    QAudioInput *in;
    void say(const QString message);
signals:

public slots:

};

#endif // NATIVEAUDIO_H

#endif
